package com.pic.others.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author koshi
 * @since 2023-11-24
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("picture")
@AllArgsConstructor
public class Picture implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 图片id
     */

    @JsonSerialize(using = ToStringSerializer.class)
    @TableId( type = IdType.ASSIGN_ID)
    private Long picId;



    /**
     * 用户id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 图片位置
     */
    private String locate;

    /**
     * 图片时间
     */

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime dateTime;

    /**
     * 种类id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long categoryId;

    /**
     * 是否已经分类过了
     * //true:已经分类过了
     * //false:未来分类
     */
    private String flag;

    /**
     *  获取大小
     */
    private String size;

}
